//
//  Define.h
//  XJMCustomer
//
//  Created by 高波 on 2018/12/25.
//  Copyright © 2018 Mr.hu. All rights reserved.
//

#ifndef Define_h
#define Define_h

#define PrivatyKeySecret  @"78ce7941a4edb427"
#define CurrentVersion  @"1.0.0"
#define SocketHost   @"http://www.pargo24.com"
#define SocketPort   9501
#define ApiKey @"cd1cb38c0cdbd02f44828fa3a3b343dd"; // 高德的apikey
#define QiniuKey   @"5N6gxBSfvKLZRSAuv3yKMTJkiWMfzIIMeCjQsNRW"  //七牛云key
//#define QiniuPrevious  @"http://oxll5q098.bkt.clouddn.com/"     //七牛URL前段
#define kQiniuBaseUrl @"http://pic.xijiaomo.com"
//#define SocketIDHost  @"http://www.pargo24.com:9501"   //socketHost  测试
#define SocketIDHost  @"https://api.xijiaomo.com:9501" //socketHost  生产环境

#define UMengUShareAppKey  @"5a12cabc8f4a9d5418000056"  //友盟分享
#define JPushAppKey   @"7b9e561e81b6ac9d450eca3b"   //极光推送

//颜色
#define RGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
#define UIColorFromRGB(rgbValue, _alpha) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:_alpha]
#define TableViewCellFootColor  [UIColor colorWithRed:(230)/255.0 green:(230)/255.0 blue:(230)/255.0 alpha:(1)]

//默认红
#define DefaultRedRGB [UIColor colorWithRed:(213)/255.0 green:(32)/255.0 blue:(30)/255.0 alpha:(1)]
//默认灰色 RGBA(51, 51, 51, 51);  RGBA(254, 153, 9, 1)
#define DefaultgrayRGB [UIColor colorWithRed:(153)/255.0 green:(153)/255.0 blue:(153)/255.0 alpha:(1)]

//是否为iphone4
#define IS_IPHONE_4 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )480 ) < DBL_EPSILON )

//是否为iphone5
#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )

//是否为iphone6
#define IS_IPHONE_6 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )667 ) < DBL_EPSILON )

//是否为iphone6Plus
#define IS_IPHONE_6PLUS ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )736 ) < DBL_EPSILON )

//图片拉伸
#define STRETCHIMAGE(image) (image) = [(image) stretchableImageWithLeftCapWidth:floorf((image).size.width/2) topCapHeight:floorf((image).size.height/2)]

//主题色
#define kthemeColor RGBA(213, 32, 30, 1)
#define Tabbar_TitleColor RGBA(94, 95, 96, 1)
#define Tabbar_TitleColor_selected RGBA(213, 32, 30, 1)

#define WayChooseColor [UIColor colorWithRed:127/255.0 green:180/255.0 blue:255/255.0 alpha:1]
#define GrayColor [UIColor colorWithRed:157/255.0 green:157/255.0 blue:157/255.0 alpha:1]
#define WayOrangeColor [UIColor colorWithRed:249/255.0 green:103/255.0 blue:56/255.0 alpha:1]
#define DeaultColor [UIColor colorWithRed:33/255.0 green:67/255.0 blue:91/255.0 alpha:1]
#define WayBlueColor [UIColor colorWithRed:1/255.0 green:150/255.0 blue:255/255.0 alpha:1]

#define DefaultGrayFontColor  [UIColor colorWithRed:(51)/255.0 green:(51)/255.0 blue:(51)/255.0 alpha:(1)] //默认灰色字体颜色
#define ScreenBounds [[UIScreen mainScreen] bounds]
#define ScreenWidth  [[UIScreen mainScreen] bounds].size.width
#define ScreenHeight [[UIScreen mainScreen] bounds].size.height

#define fifthPadding 15

// 尺寸
#define kSafeAreaTopHeight [UIApplication sharedApplication].delegate.window.safeAreaInsets.top
#define kSafeAreaBottomHeight [UIApplication sharedApplication].delegate.window.safeAreaInsets.bottom
#define kUIScreenWidth [[UIScreen mainScreen] bounds].size.width
#define kUIScreenHeight [[UIScreen mainScreen] bounds].size.height
#define kControllerViewHeight kUIScreenHeight - kSafeAreaTopHeight - kSafeAreaBottomHeight - 44 // 控制器高度

#endif /* Define_h */
